package com.qf.gh.web.servlet;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/testservlet")
public class TestServlet extends BaseServlet{
    public void select(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("add");
        try {
            resp.getWriter().print("ajaxcghcgh");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public String add(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("add");
        return "redirect:/login.jsp";
    }

    public String update(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("update");
        return "forward:/login.jsp";
    }
    public void hhhfff(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.getWriter().print("123456789");
    }
}
